package com.itheima.homework.tcp;

import java.io.*;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class Client {
    public static void main(String[] args) throws IOException {
        Socket sk = new Socket(InetAddress.getLocalHost(),44444);
        OutputStream outputStream = sk.getOutputStream();
        //BufferedOutputStream bos = new BufferedOutputStream(outputStream);
        OutputStreamWriter osw = new OutputStreamWriter(outputStream);
        BufferedWriter bw = new BufferedWriter(osw);
        String str = "嘿嘿嘿";
        //byte[] bytes = str.getBytes();
        bw.write(str);
        bw.close();
        sk.close();
    }
}
